createAnimationInstance
Type
function
Summary
Creates an animation instance from a defined animation.
Syntax
createAnimationInstance(<pTargetControl>, <pAnimationName>, [<pOptions>])
Description
Creates an instance of a keyframe animation that can be played on a
target control.
The animation instance is based on a previously defined animation
(using defineAnimation
). pOptions
can be used to modify playback parameters
like looping, direction, delays, and playback speed.
The returned ID can be used to control the animation instance using
startAnimation
, stopAnimation
, and pauseAnimation
.
Parameters
Name | Type | Description |
---|---|---|
pTargetControl | The long id of the control to apply the animation to. | |
pAnimationName | The name of the animation definition (created with | |
pOptions | An array of options to customize the animation instance. Possible keys include:
|
Examples
local tAnimationID
put createAnimationInstance(the long id of button "Target", "myAnimation") into tAnimationID
if "error" is not in tAnimationID then
startAnimation tAnimationID
end if
Compatibility and Support
OS
mac
windows
linux
ios
android
Platforms
desktop
mobile
web